package binarycrew.livewallpapers.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

import android.content.ContentValues;
import android.provider.BaseColumns;

public class WallpapersProvider {

	public interface TimeColumns {

		String TIMESTAMP = "timestamp";
		String TIME = "time";
	}

	public interface DownloadedGalleriesColumns {

		String PHOTO_SOURCE_ID = "photo_source_id";
		String URL = "url";
	}

	//	public interface PhotoSourceColumns {
	//
	//		String DESCRIPTION = "description";
	//		String COPYRIGHT = "copyright";
	//		String URL = "url";
	//	}

	public static class DownloadedGalleries implements BaseColumns, TimeColumns, DownloadedGalleriesColumns {

		public static ContentValues buildValues(long timestamp, String url) {//, int source_id) {
			Date date = new Date(timestamp);
			SimpleDateFormat formater = new SimpleDateFormat("dd.MMM HH:mm:ss");

			ContentValues values = new ContentValues();
			values.put(TimeColumns.TIMESTAMP, timestamp);
			values.put(TimeColumns.TIME, formater.format(date));
			values.put(DownloadedGalleriesColumns.URL, url);
			//values.put(DownloadedGalleriesColumns.PHOTO_SOURCE_ID, source_id);
			return values;
		}
	}

	//	public static class PhotoSource implements BaseColumns, PhotoSourceColumns {
	//
	//		public static ContentValues buildValues(String url, String copyright) {
	//
	//			ContentValues values = new ContentValues();
	//			values.put(PhotoSourceColumns.URL, url);
	//			values.put(PhotoSourceColumns.COPYRIGHT, copyright);
	//			return values;
	//		}
	//
	//	}
}
